/*
 * Filename:    EvaluationOrgDaoImpl.java
 * Copyright:   2015 中国平安保险（集团）股份有限公司 版权所有
 * Company:     平安科技养老险及健康险系统开发部
 * Create at:   2015-1-30
 */
package com.paic.mhis.hcpms.evaluation.evaluationOrg.evaluationIntegrity.dao;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Component;

import com.paic.mhis.hcpms.evaluation.evaluationOrg.evaluationIntegrity.dto.EvaluationOrgDTO;
import com.paic.pafa.biz.dao.BaseDAO;

@Component("evaluationIntegrityOrgDao")
public class EvaluationIntegrityOrgDao extends BaseDAO {

	/**
	 * 定点机构诚信List查询
	 */

	public List<EvaluationOrgDTO> getEvaluationOrgList(Map<String, Object> map) {
		return (List<EvaluationOrgDTO>) this._queryForList("evaluationOrg.getEvaluationOrgList", map);
	}

	/**
	 * 根据年份查询当前需要展示的考评得分名称集合
	 */

	public List<String> getEvaluationName(Map<String, Object> map) {
		return (List<String>) this._queryForList("evaluationOrg.getEvaluationName", map);
	}

	/**
	 * 查询考评得分
	 */

	public List<Map> getEvaluationScore(Map<String, Object> map) {

		return (List<Map>) this._queryForList("evaluationOrg.getEvaluationScore", map);
	}

	/**
	 * 查询考评机构总数
	 */

	public int getEvaluationOrgListCount(Map<String, Object> condition) {
		Object object = this._getObject("evaluationOrg.getEvaluationOrgListCount", condition);
		int count = Integer.parseInt(object.toString());
		return count;
	}

	/**
	 * 查询是否有免考单位
	 * 
	 * @param orgCode
	 * @param year
	 * @return
	 */
	public boolean queryExemptionUnitCount(Map<String, Object> umap) {
		int unitCount = this._getInt("evaluationOrg.queryExemptionUnitCount", umap);
		if (unitCount > 0) {
			return true;
		} else {
			return false;
		}
	}
}
